﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace UtilsORM.MySqlData;

[MySqlCharSet("utf8mb3")]
[MySqlCollation("utf8mb3_general_ci")]
public partial class bs_system_oauth_client
{
    [Key]
    public long oc_autoid { get; set; }

    [StringLength(50)]
    public string oc_client_id { get; set; }

    /// <summary>
    /// 能访问的资源，哪个系统
    /// </summary>
    [StringLength(255)]
    public string oc_resource_ids { get; set; }

    /// <summary>
    /// 客户端访问的密码
    /// </summary>
    [StringLength(50)]
    public string oc_client_secret { get; set; }

    /// <summary>
    /// 在oauth流程中会检测查与注册时填写的redirect_uri是否一致
    /// </summary>
    [StringLength(50)]
    public string oc_web_server_redirect_uri { get; set; }

    /// <summary>
    /// 设定客户端access_token有效时间值（单位秒）
    /// </summary>
    public int? oc_access_token_validity_time { get; set; }

    /// <summary>
    /// 客户申请的权限范围，可选值包括read,write,trust,有多个权限范围用逗号（,）分隔
    /// </summary>
    [StringLength(255)]
    public string oc_scope { get; set; }

    public int? oc_status { get; set; }

    [Column(TypeName = "datetime")]
    public DateTime? oc_mod_time { get; set; }

    [Column(TypeName = "datetime")]
    public DateTime? oc_add_time { get; set; }
}
